home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / NET / AF_UNIX.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  914b  |  36 lines

  1. #ifndef __LINUX_NET_AFUNIX_H
  2. #define __LINUX_NET_AFUNIX_H
  3. extern void unix_proto_init(struct net_proto *pro);
  4. extern struct proto_ops unix_proto_ops;
  5. extern void unix_inflight(struct file *fp);
  6. extern void unix_notinflight(struct file *fp);
  7. typedef struct sock unix_socket;
  8. extern void unix_gc(void);
  9.  
  10. #define UNIX_HASH_SIZE    16
  11.  
  12. extern unix_socket *unix_socket_table[UNIX_HASH_SIZE+1];
  13.  
  14. #define forall_unix_sockets(i, s) for (i=0; i<=UNIX_HASH_SIZE; i++) \
  15.                                     for (s=unix_socket_table[i]; s; s=s->next)
  16.  
  17. struct unix_address
  18. {
  19.     atomic_t    refcnt;
  20.     int        len;
  21.     unsigned    hash;
  22.     struct sockaddr_un name[0];
  23. };
  24.  
  25. struct unix_skb_parms
  26. {
  27.     struct ucred        creds;        /* Skb credentials    */
  28.     struct scm_fp_list    *fp;        /* Passed files        */
  29.     unsigned        attr;        /* Special attributes    */
  30. };
  31.  
  32. #define UNIXCB(skb)     (*(struct unix_skb_parms*)&((skb)->cb))
  33. #define UNIXCREDS(skb)    (&UNIXCB((skb)).creds)
  34.  
  35. #endif
  36.